<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>添加菜品</title>
    <link rel="stylesheet" href="/static/layui/css/layui.css" media="all">
</head>

<body>
    <script src="/static/layui/layui.js"></script>
    <script type="text/javascript">
    	layui.use('upload',function(){
    		var picUpload = layui.upload;
    		var uploadInst = picUpload.render({
    			elem: '#UploadFoodPic',
    			url: 'http://10.12.25.65:8666/v1/file/upload',
    			done :function(res){
					console.log('文件上传成功：'+JSON.stringify(res));
    			},
    			error :function(err){
					console.log('文件上传成功：'+JSON.stringify(err));
    			},
    		});
    	});
    </script>
    <div class="layui-container">
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
            <legend>请上传菜品图片</legend>
        </fieldset>
        <div class="layui-upload">
            <button type="button" class="layui-btn" id="UploadFoodPic">可同时上传多张</button>
            <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
                预览图：
                <div class="layui-upload-list" id="demo2"></div>
            </blockquote>
        </div>
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
            <legend>请填写菜品信息</legend>
        </fieldset>
        <form class="layui-form">
            <div class="layui-form-item">
                <label class="layui-form-label">图片地址</label>
                <div class="layui-input-block">
                    <input type="text" name="ShopName" required lay-verify="required" placeholder="图片地址" autocomplete="off" edit=false class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">菜品名称</label>
                <div class="layui-input-block">
                    <input type="text" name="Name" required lay-verify="required" placeholder="请输入菜品名称" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">今日售价</label>
                <div class="layui-input-block">
                    <input type="text" name="Price" required lay-verify="required|number" placeholder="请输入菜品销售价格" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">菜品原价</label>
                <div class="layui-input-block">
                    <input type="text" name="OriginalPrice" required lay-verify="required|number" placeholder="请输入菜品销售价格" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">今日库存</label>
                <div class="layui-input-block">
                    <input type="text" name="Price" required lay-verify="required|number" placeholder="请输入菜品销售价格" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">菜品简介</label>
                <div class="layui-input-block">
                    <textarea name="desc" placeholder="请输入菜品简介内容" class="layui-textarea"></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit='' lay-filter="addStore">立即提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>
</body>

</html>